package Problem;

import java.util.Scanner;

//
// Created by ✎﹏ℳ๓独赏☆独醉 on 2024/1/17.
// 
public class 砝码数 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        int max = 0;
        int fama;
        for (fama = 1; max < num; fama++) {
            max = max*3+1;
        }
        System.out.println(fama-1);
    }
}
